package com.david.client.ui.usermanager;

import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.widgets.form.ColumnConfig;
import com.gwtext.client.widgets.form.FieldSetConfig;
import com.gwtext.client.widgets.form.Form;
import com.gwtext.client.widgets.form.FormConfig;
import com.gwtext.client.widgets.form.TextArea;
import com.gwtext.client.widgets.form.TextAreaConfig;
import com.gwtext.client.widgets.form.TextField;
import com.gwtext.client.widgets.form.TextFieldConfig;

public class DeleteUserForm extends VerticalPanel {
	public DeleteUserForm() {
		super();
		setWidth("100%");
		setHeight("100%");
		setVerticalAlignment(VerticalPanel.ALIGN_TOP);
		setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
		setSpacing(10);
		add(getForm());
	}
	
	 
	private Form getForm(){
        Form form = new Form(new FormConfig() {
            {
                setLabelAlign("left");
                setLabelWidth(75);
                setWidth(700);
                setHeader("Delete User");
                setSurrondWithBox(true);
            }
        });

        form.fieldset("Contact Information");


        form.add(new TextField(new TextFieldConfig() {
            {
                setFieldLabel("First Name");
                setName("fullName");
                setAllowBlank(false);
                setValue("Sanjiv Jivan");
            }
        }));
        form.add(new TextField(new TextFieldConfig() {
            {
                setFieldLabel("Last Name");
                setName("fullName");
                setAllowBlank(false);
                setValue("Sanjiv Jivan");
                setCls("SameRowField");
                
            }
        }));
        form.add(new TextField(new TextFieldConfig() {
            {
                setFieldLabel("Job Title");
                setName("title");
            }
        }));

        form.add(new TextArea(new TextAreaConfig() {
            {
                setFieldLabel("Address");
                setName("address");
                setGrow(true);
                setPreventScrollbars(true);
            }
        }));
        form.end();

		form.render();
		return form;
	}
}
